

public class Course {
    private String courseID;
    private String courseName;
    private String teacher;

    //无参构造方法
    public Course(){}

    //带参构造方法
    public Course(String courseID,String courseName,String teacher) {
        this.courseID = courseID;
        this.courseName=courseName;
        this.teacher=teacher;
    }

    //getter and setter


    public String getCourseID() {
        return courseID;
    }

    public void setCourseID(String courseID) {
        this.courseID = courseID;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getTeacher() {
        return teacher;
    }

    public void setTeacher(String teacher) {
        this.teacher = teacher;
    }

    //showInfo
    public void showInfo(){
        System.out.println("课程名称："+courseID);
        System.out.println("课程编号："+courseName);
        System.out.println("任课教师："+teacher);
        System.out.println("----------------");




    }
}
